def print_go_board(size):
    """打印与示例风格一致的五子棋棋盘"""
    # 打印顶部横线（由"+"和"-"组成的网格横线）
    horizontal_line = "+" + "---+" * size
    for _ in range(size + 1):
        print(horizontal_line)
        # 打印竖线行（由"|"和"   "组成的网格竖线）
        vertical_line = "|" + "   |" * size
        print(vertical_line)

if __name__ == "__main__":
    try:
        size = input("请输入棋盘大小（如10）：")
        size = int(size) if size else 10
        if size < 5:
            size = 5
        print(f"{size}×{size} 五子棋棋盘：")
        print_go_board(size)
    except ValueError:
        print("请输入有效整数")